#   0xffffffff814a5d10 <+96>:	shr    $0x4,%al
#   0xffffffff814a5d13 <+99>:	cmp    $0x4,%al
#   0xffffffff814a5d15 <+101>:	ja     0xffffffff814a5d48 <tcp_v4_rcv+152>

#   0xc0501381 <+1>:	mov    %esp,%ebp
#   0xc0501383 <+3>:	sub    $0x48,%esp
#   0xc0501386 <+6>:	mov    %ebx,-0xc(%ebp)

define dpe
  if ($argc < 2)
    printf "Usage: dpe pe_type pe_config [enable]\n"
  end
  if ($argc >= 2)
    set $tmp=0
    while $tmp<$cpu_number
      eval "tvariable $pc_pe_type_%d%d_%d=%d",$arg0, $arg1, $tmp, $arg0
      eval "tvariable $pc_pe_config_%d%d_%d=%d",$arg0, $arg1, $tmp, $arg1
      eval "tvariable $pc_pe_val_%d%d_%d=0",$arg0, $arg1, $tmp
      if ($argc >= 3)
        eval "tvariable $pc_pe_en_%d%d_%d=%d",$arg0, $arg1, $tmp, $arg2
      end
      set $tmp=$tmp+1
    end
  end
end

dpe 0 0 0

set $tmp=0
while $tmp<$cpu_number
  eval "tvariable $pc_c_%d",$tmp
  set $tmp=$tmp+1
end

trace *(tcp_v4_rcv+1)
  commands
    teval $pc_pe_en=1
  end
trace *(tcp_v4_rcv+6)
  commands
    teval $pc_pe_en=0
    teval $pc_c_0=$pc_c_0+1
  end

define showall
  if ($argc > 0)
    set $tmp=$arg0
  end
  if ($argc == 0)
    set $tmp=0
  end
  while $tmp<$cpu_number
    printf "CPU%d\n",$tmp
    eval "p $pc_c_%d",$tmp
    eval "p $pc_pe_val_00_%d/$pc_c_%d",$tmp,$tmp
    set $tmp=$tmp+1
  end
end
